Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate headers to WS upstream using connection_init #343

Closed

Conversation

v0id3r
Copy link

@v0id3r v0id3r commented Feb 16, 2022

Solves #290

We already have http.Header and include it when hashing.
However, we do not propagate the actual value during the init+ack handshake.

With this change, it will send headers as payload.
Works perfectly together with client-facing WS init hook from #275 and makes it possible to propagate init payload from user WS to federation WS. Entities requests also follow and headers are attached to outgoing requests to data sources.

playground sends headers as payload instead of regular headers for subscriptions.
gqlgen has a special hook on WebSocket for init.

Going to add specific tests, but it is at least backward-compatible with existing suite.

@v0id3r
Copy link
Author

v0id3r commented Feb 17, 2022

@chedom Hi, you mentioned that you've also implemented headers propagation at your fork. May I ask you to provide some feedback here, if any?

@chedom
Copy link
Contributor

chedom commented Feb 17, 2022

Hi @v0id3r , my solution is very close to your implementation.

@bailycase
Copy link

Is there any update on this being merged?

@devsergiy
Copy link
Member

closed in favor of #425

@devsergiy devsergiy closed this Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants